package Monkey;

public class Test {
    public static void main(String[] args) {

        try {
            QiTianDaSheng qtds = new QiTianDaSheng();
            QiTianDaSheng qtdsClon = (QiTianDaSheng)qtds.clone();
            System.out.println(qtds);
            System.out.println(qtdsClon);
            System.out.println("深克隆："+ (qtds==qtdsClon));
            System.out.println("深克隆："+ (qtds.jinGuBang==qtdsClon.jinGuBang));
        } catch (CloneNotSupportedException e) {
            e.printStackTrace();
        }

        QiTianDaSheng qtds1 = new QiTianDaSheng();
        QiTianDaSheng qtdsClon1 = qtds1.shallowClone(qtds1);
        System.out.println(qtds1);
        System.out.println(qtdsClon1);
        System.out.println("浅克隆："+ (qtds1==qtdsClon1));
        System.out.println("浅克隆："+ (qtds1.jinGuBang==qtdsClon1.jinGuBang));
    }
}
